package app.controllers.admin.ktv;

import app.models.booking.KtvBooking;
import com.github.sog.controller.BasicController;
import com.github.sog.controller.datatables.core.DatatablesCriterias;
import com.jfinal.plugin.activerecord.Page;

/**
 * <p>
 * .KTV预定查询
 * </p>
 *
 * @author liuhui
 * @version 1.0 14-5-24 下午7:46
 */
public class BookingController extends BasicController {

    public void index() {
        render("index.ftl");
    }

    public void list() {
        final DatatablesCriterias criterias = getCriterias();
        String captcha = getPara("captcha");
        String phone = getPara("phone");

        String start = getPara("start");
        String end = getPara("end");
        Page<KtvBooking> pageRt = KtvBooking.dao.datatable(criterias, captcha, phone, start, end);

        renderDataTables(pageRt, criterias);
    }
}
